import request from '@/utils/request'

// 查询专业分包列表
export function listSubcontracting(query) {
  return request({
    url: '/system/subcontracting/list',
    method: 'get',
    params: query
  })
}

// 查询专业分包详细
export function getSubcontracting(id) {
  return request({
    url: '/system/subcontracting/' + id,
    method: 'get'
  })
}

// 新增专业分包
export function addSubcontracting(data) {
  return request({
    url: '/system/subcontracting',
    method: 'post',
    data: data
  })
}

// 修改专业分包
export function updateSubcontracting(data) {
  return request({
    url: '/system/subcontracting',
    method: 'put',
    data: data
  })
}

// 删除专业分包
export function delSubcontracting(id) {
  return request({
    url: '/system/subcontracting/' + id,
    method: 'delete'
  })
}

// 导出专业分包
export function exportSubcontracting(query) {
  return request({
    url: '/system/subcontracting/export',
    method: 'get',
    params: query
  })
}


export function submitAgain(data) {
  return request({
    url: '/system/subcontracting/submitAgain',
    method: 'post',
    data: data
  })
}


export function reject(data) {
  return request({
    url: '/system/subcontracting/reject',
    method: 'post',
    data: data
  })
}

export function agree(data) {
  return request({
    url: '/system/subcontracting/agree',
    method: 'post',
    data: data
  })
}